<!doctype html>
<html lang=en>
<head>
<meta charset=utf-8>
<title>Table of contents</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.1/css/all.min.css" integrity="sha512-9my9Mb2+0YO+I4PUCSwUYO7sEK21Y0STBAiFEYoWtd2VzLEZZ4QARDrZ30hdM1GlioHJ8o8cWQiy8IAb1hy/Hg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<style>@import "dist/ourbigbook.css";

</style>
<link rel="stylesheet" type="text/css" href="main.css">
</head>
<body>
<header>
<a href="/">Ciro Santilli???</a>
<a href=".">Ourbigbook!!!</a>
<a class="font-awesome-container" href="https://github.com/cirosantilli/ourbigbook"><i class="fab fa-github fa-fw"></i></a>
</header>
<main class="ourbigbook">
<div><span class="hide-hover"><a href=".#table-of-contents"><span class="fa-solid-900"></span></a></span><div class="h" id="table-of-contents"><h1><a href="" title="link to this element">Table of contents (<code>\Toc</code>)</a></h1>
<span class="hover-meta"> <span class="sep"></span><a title="view all headers in a single page" href=".#table-of-contents"><span class="fa-solid-900"></span> nosplit</a><span class="sep"></span><a href=".#macro" title="parent header"><span class="fa-solid-900"></span> "Macro"</a><span class="sep"></span><span class="metrics"><span title="word count for this node + all descendants"><span class="fa-regular-400"></span> words: <span class="word-count-descendant">492</span></span></span></span></div><nav class="h-nav h-nav-toplevel"><div class="nav"> <span title="tags" class="fa-solid-900"></span> tags: <a href=".#header-metadata-section" title="internal link
word count: 3
descendant word count: 213
descendant count: 48">Header metadata section</a></div><div class="nav"> <a href=".#macro" title="parent header"><span class="fa-solid-900"></span> "Macro"</a><span class="sep"></span><a title="view all headers in a single page" href=".#table-of-contents"><span class="fa-solid-900"></span> nosplit</a><span class="sep"></span><a href="#toc"><span class="fa-solid-900"></span> toc</a><span class="sep"></span><span class="metrics"><span title="word count for this node + all descendants"><span class="fa-regular-400"></span> words: <span class="word-count-descendant">492</span></span></span></div></nav>
</div><div><span class="hide-hover"><a href="#_1474"><span class="fa-solid-900"></span></a></span><div class="p" id="_1474">OurBigBook automatically adds a ToC at the end of the first <a href=".#the-toplevel-header" title="internal link
word count: 2
descendant word count: 317
descendant count: 39">non-toplevel header</a> of every document.</div></div><div><span class="hide-hover"><a href="#_1475"><span class="fa-solid-900"></span></a></span><div class="p" id="_1475">For example, on a standard document with a single toplevel header:
<div class="code" id="_1476">
<pre><code>= Animal

Animals are cute!

== Dog

== Cat
</code></pre></div>
the ToC is rendered like:
<div class="code" id="_1477">
<pre><code>= Animal

Animals are cute!

Table of Contents
* Dog
* Cat

== Dog

== Cat
</code></pre></div></div></div><div><span class="hide-hover"><a href="#_1478"><span class="fa-solid-900"></span></a></span><div class="p" id="_1478">You may customize ToC placement with <code>\Toc</code> macro, but just don't do it, it will just go against common convention and confuse readers.</div></div><div><span class="hide-hover"><a href="#_1479"><span class="fa-solid-900"></span></a></span><div class="p" id="_1479">This is especially important when considering <a href=".#split-headers" title="internal link
word count: 1
descendant word count: 455
descendant count: 352"><code>--split-headers</code></a>, where you almost always want an automatically generated ToC for every split header, otherwise you would need to add them all manually.</div></div><div><span class="hide-hover"><a href="#_1480"><span class="fa-solid-900"></span></a></span><div class="p" id="_1480">Only one ToC is rendered per document. Any ToC besides the first one is ignored. In particular, this means that <a href=".#include" title="internal link
word count: 25
descendant word count: 612
descendant count: 363">includes</a> with <a href=".#embed-includes" title="internal link
word count: 0
descendant word count: 163
descendant count: 163"><code>--embed-includes</code></a> work seamlessly and render a single table of contents, even if multiple <code>\Toc</code> macros are present in the included pages.</div></div><div><span class="hide-hover"><a href="#_1481"><span class="fa-solid-900"></span></a></span><div class="p" id="_1481">The <a href=".#internal-cross-reference" title="internal link
word count: 28
descendant word count: 2k
descendant count: 98">ID</a> of the ToC is always fixed to <code>#toc</code>. If you try to use that for another element, you will get the following error:
<div class="code" id="_1482">
<pre><code>error: tmp.bigb:3:1: reserved ID "toc"
</code></pre></div></div></div><div><span class="hide-hover"><a href="#_1483"><span class="fa-solid-900"></span></a></span><div class="p" id="_1483">The ToC ignores <a href=".#the-toplevel-header" title="internal link
word count: 2
descendant word count: 317
descendant count: 39">the toplevel header</a> if you have one.</div></div><div><span class="hide-hover"><a href="#_1484"><span class="fa-solid-900"></span></a></span><div class="p" id="_1484">For when you want a quick outline of the header tree on the terminal, also consider the <a href=".#log-headers" title="internal link
word count: 0
descendant word count: 112
descendant count: 112"><code>--log headers</code></a> option.</div></div><div><span class="hide-hover"><a href="#toc"><span class="fa-solid-900"></span></a></span><div id="toc"class="toc-container">
<ul>
<li class="has-child toplevel"><div class="title-div"><div class="arrow"><div></div></div><span class="not-arrow"><a class="title" href="#toc">Table of contents</a><span class="hover-metadata"><span class="metrics-sep"><span class="sep"></span><span class="metrics"><span title="word count for this node + all descendants"><span class="fa-regular-400"></span> <span class="word-count-descendant">492</span></span></span></span></span></span></div>
<ul>
<li><div id="toc-table-of-contents-javascript-open-close-interaction"><div class="arrow"><div></div></div><span class="not-arrow"><a href="table-of-contents-javascript-open-close-interaction">1. Table of contents JavaScript open close interaction</a><span class="hover-metadata"><span class="sep"></span><a href="#toc-table-of-contents-javascript-open-close-interaction" title="link to this ToC entry"><span class="fa-solid-900"></span> link</a><span class="sep"></span><a title="view all headers in a single page" href=".#table-of-contents-javascript-open-close-interaction"><span class="fa-solid-900"></span> nosplit</a><span class="sep"></span><a href="#toc" title="parent ToC entry"><span class="fa-solid-900"></span> "Table of contents"</a><span class="metrics-sep"><span class="sep"></span><span class="metrics"><span title="word count for this node"><span class="fa-regular-400"></span> <span class="word-count">286</span></span></span></span></span></span></div></li>
</ul>
</li>
</ul>
</div>
</div><div><span class="hide-hover"><a href="#ancestors"><span class="fa-solid-900"></span></a></span><h2 id="#ancestors"><a href="#ancestors">Ancestors</a></h2></div>
<div><ul>
<li><a href=".#macro" title="internal link
word count: 155
descendant word count: 14k
descendant count: 14">Macro</a></li>
<li><a href="." title="internal link
word count: 296
descendant word count: 32k
descendant count: 234">OurBigBook</a></li>
</ul></div><div><span class="hide-hover"><a href="#incoming-links"><span class="fa-solid-900"></span></a></span><h2 id="incoming-links"><a href="#incoming-links">Incoming links</a></h2></div>
<div><ul>
<li><a href=".#autogenerated-tests" title="internal link
word count: 1
descendant word count: 59
descendant count: 44">Autogenerated tests</a></li>
<li><a href=".#features" title="internal link
word count: 0
descendant word count: 1k
descendant count: 1k">Features</a></li>
<li><a href=".#h-numbered-argument" title="internal link
word count: 0
descendant word count: 335
descendant count: 335"><code>\H</code> <code>numbered</code> argument</a></li>
<li><a href=".#h-synonym-argument" title="internal link
word count: 3
descendant word count: 591
descendant count: 126"><code>\H</code> <code>synonym</code> argument</a></li>
<li><a href=".#h-title2-argument" title="internal link
word count: 0
descendant word count: 200
descendant count: 200"><code>\H</code> <code>title2</code> argument</a></li>
<li><a href=".#header-metadata-section" title="internal link
word count: 3
descendant word count: 213
descendant count: 48">Header metadata section</a></li>
<li><a href=".#include" title="internal link
word count: 25
descendant word count: 612
descendant count: 363">Include</a></li>
<li><a href=".#log-headers" title="internal link
word count: 0
descendant word count: 112
descendant count: 112"><code>--log headers</code></a></li>
<li><a href=".#overview-of-files-in-this-repository" title="internal link
word count: 1
descendant word count: 436
descendant count: 364">Overview of files in this repository</a></li>
<li><a href=".#secondary-children" title="internal link
word count: 0
descendant word count: 104
descendant count: 104">Secondary children</a></li>
<li><a href=".#skipping-header-levels" title="internal link
word count: 0
descendant word count: 84
descendant count: 84">Skipping header levels</a></li>
<li><a href=".#tagged" title="internal link
word count: 0
descendant word count: 61
descendant count: 61">Tagged</a></li>
<li><a href=".#x-child-argument" title="internal link
word count: 10
descendant word count: 363
descendant count: 232"><code>\x</code> <code>child</code> argument</a></li>
</ul></div></main>
<footer>
<div>License: <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a> unless noted</div>
<div>Website source code: <a href="https://github.com/cirosantilli/ourbigbook">https://github.com/cirosantilli/ourbigbook</a></div>
<div>Website Git version: <a href="https://github.com/cirosantilli/ourbigbook/commit/72b4ad0343402d4c826196c7d9bc27ae17c31e1d">72b4ad0343402d4c826196c7d9bc27ae17c31e1d</a></div>
</footer>
<script>
<!-- Google Analytics, AKA selling my soul to Google for some backlinks. -->
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-47867706-1', 'auto');
ga('send', 'pageview');
</script>
<script src="dist/ourbigbook_runtime.js"></script>
<script>ourbigbook_runtime.ourbigbook_runtime()</script>
</body>
</html>
